//
//  LevelMaker.h
//  StarBugs
//
//  Created by ?? ? on 12/22/11.
//  Copyright 2011 antisword@playorca.com. All rights reserved.
//

#ifndef __LEVEL_MAKER_H__
#define __LEVEL_MAKER_H__

#include "Box2D.h"
#include "cocos2d.h"

//#define MAX_CHAPTER 7
enum{
    maker_ob_type,
    maker_ob_positon,
    maker_ob_rotation,
};

enum{
    levelDataType_type,
    levelDataType_x,
    levelDataType_y,
    levelDataType_angle,
};


class ObjectData: public cocos2d::CCObject{
public:
    int type;
    cocos2d::CCPoint position;
    float rotation;
    bool isFlip;
};

class LevelMaker : public cocos2d::CCNode{
public:
    ~LevelMaker();
    LevelMaker(b2World *world, cocos2d::CCSize _worldSize);

    int getChapterData(int chapter, int stage, int cnt, int type);
    int getLevelHeight(int chapter, int stage);
//    int getLevelTime(int chapter, int stage);
//    void getObjectWithLevel(int chapter, int level);
    static int getMaxStage(int chapter);

    
private:
    b2World *world;
    cocos2d::CCSize worldSize;
};



#endif